/*
 * Record.cpp
 */

#include "Record.h"

Record::Record() {
}

Record::~Record() {
	_stdnt.~Student(); //call destructor explicitly to clean objects created with placement new operator
}

Student *Record::GetStudent() {
	return &_stdnt;
}

//Setters overwrite initially allocated memory space
void Record::SetStudent(Student &std) {
	new(&_stdnt) Student(std);
}

//void Record::SetStudent(int ssn = 0, string lastname = "McFake", string firstname = "Fakity", string address = "42 Wallaby Place", int major = 1) {
void Record::SetStudent(int ssn, string lastname, string firstname, string address, int major) {
	new(&_stdnt) Student(ssn, lastname, firstname, address, major);
}
